//
//  BsCollectionViewCell.m
//  Demo
//
//  Created by colawh on 2019/3/16.
//  Copyright © 2019年 colawhdfws. All rights reserved.
//

#import "BsBlueCollectionViewCell.h"
#import <Masonry/Masonry.h>
#define kUIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define kUIColorFromRGBA(rgbValue,a) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:a]

#define kCommonColor kUIColorFromRGB(0x41a1ff)
#define kCommonLineColor kUIColorFromRGB(0xeeeeee)
#define kCommonTextColor_One  kUIColorFromRGBA(0x000000, 0.85)
#define kCommonlogLine  kUIColorFromRGBA(0x000000, 0.25)
#define kCommonGreenColor kUIColorFromRGB(0x7fca5b)

#define RGBAColor(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define RGBColor(r, g, b) RGBAColor(r,g,b,1.0)
#define kGlobalBg kUIColorFromRGB(0xf6f6f6)
#define kUIScreenSize [UIScreen mainScreen].bounds.size
#define kUIScreenWidth kUIScreenSize.width
#define kUIScreenHeight kUIScreenSize.height
@implementation BsBlueCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self configUI];
    }
    return self;
}

- (void)configUI{
    [self.contentView addSubview:self.textLb];
    [_textLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

- (UILabel *)textLb{
    if (!_textLb) {
        _textLb = [DemoHelp getLbByFont:14];
        _textLb.textAlignment = NSTextAlignmentCenter;
        _textLb.textColor = kUIColorFromRGB(0x0085FE);
        _textLb.backgroundColor = kUIColorFromRGBA(0x0085FE, 0.05);
        _textLb.layer.masksToBounds = YES;
        _textLb.layer.cornerRadius = 12;
    }
    return _textLb;
}

@end
